const HtmlWebpackPlugin=require("html-webpack-plugin")
module.exports={
    entry:"./src/index.tsx",
    resolve:{
        // tsx 就是ts写的jsx
        extensions:[".tsx",".ts",".js"]
    },
    module:{
        rules:[
            {
                // react里面 jsx 改成 tsx后缀.
                test:/\.tsx$/,loader:"ts-loader"
            }
        ]
    },
    plugins:[
        new HtmlWebpackPlugin({
            template:"./src/template.html"
        })
    ]
}